package bukkit.plugin.antiSwear;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

/*
 * AntiSwear - A Bukkit plugin created by Mitchell Nuckols (GewgulPlayer)
 * 
 * Built for Minecraft Bukkit 1.7.10 server
 */

public class AntiSwear extends JavaPlugin implements Listener
{
	public void onEnable()
	{
		getLogger().info("AntiSwear has started!");
		
		getServer().getPluginManager().registerEvents(new SwearListener(), this);
	}
	
	public void onDisable()
	{
		getLogger().info("AntiSwear has shut down!");
	}
	
	public boolean onCommand(CommandSender sender, Command cmd, String str, String[] args)
	{
		Player player = (Player) sender;
		
		if(str.equalsIgnoreCase("antiswear"))
		{
			player.sendMessage(ChatColor.DARK_RED + "------------------oO" + ChatColor.DARK_AQUA + "AntiSwear v1.0" + ChatColor.DARK_RED + "Oo------------------");
			player.sendMessage(ChatColor.DARK_GREEN + "Helps prevent players from cursing :D");
			player.sendMessage(ChatColor.DARK_RED + "---------------oO" + ChatColor.DARK_AQUA + "Made by GewgulPlayer" + ChatColor.DARK_RED + "Oo---------------");
			
			return true;
		}
		
		return false;
	}
}